package com.yhl.springtest;

import com.baidu.aip.ocr.AipOcr;
import org.json.JSONObject;

import java.util.HashMap;

/**
 * @author: yanghl
 * @description: TODO
 * @date: 2023/12/22 15:05
 */
public class translate {
    public static String appId = "45508515";
    public static String appKey = "IWQ8gkztS8C4EpUZ17421KvI";
    public static String appSecret = "f8KZd9qlBeCpZRPwnXakDHgsmE4Ug93Z";
    public static AipOcr client = new AipOcr(appId, appKey, appSecret);

    public static void main(String[] args) {
        client.setConnectionTimeoutInMillis(20000);
        client.setSocketTimeoutInMillis(60000);
        String path = "D:/tmp/test.png";
        JSONObject ret = client.basicGeneral(path, new HashMap<String, String>());
        System.out.println(ret);
    }

}

